<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="utf-8">
    <title>成品信息查询</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta content="no-cache, no-store, must-revalidate" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <meta content="0" http-equiv="Expires"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=8">
    <meta http-equiv="Expires" content="0">
    <meta http-equiv="Pragma" content="no-cache">
    <meta http-equiv="Cache-control" content="no-cache">
    <meta http-equiv="Cache" content="no-cache">
    <link rel="stylesheet" href="../styles/base.css"/>
    <link rel="stylesheet" href="../styles/common.css"/>
    <link rel="stylesheet" href="../styles/font/iconfont.css"/>
    <link rel="stylesheet" href="../jqueryNicepage/css/layui.css"  media="all">
    <style>
        .body{
            background:#ddecf5;
            /*overflow-y: hidden;*/
        }
        .seachHeader {
            width:100%;
            height:auto;
            clear: both;
            padding-bottom: 10px;
        }
        .seachHeader span{
            margin-top: 5px;
            float: left;
            display: inline-block;
            height:30px;
            line-height: 30px;
            font-size: 16px;

        }
        .seachHeader span:first-child{
            margin-left: 20px;
        }
        .seachHeader .inputBox{
            float:left;
            width:200px;
            height:30px;
            line-height: 30px;
            font-size: 14px;
            padding-left: 10px;
            position: relative;
        }
        .seachHeader .inputBox input{
            width:190px;
            height:30px;
            line-height: 30px;
            position: absolute;
            padding-left: 10px;
            left:0;
        }
        .searchSureButton,.searchSureBtn{
            margin-left: 10px;
            float:right;
            background-color: #eee;
            font-family: 'Open Sans', sans-serif;
            font-size: 14px;
            text-decoration: none;
            font-weight: 600;
            color: #333;
            position: relative;
            padding: 1px 15px;
            /* margin-right: 15px;*/
            margin-top:2px;
            border-top-right-radius: 10px;
            border-bottom-right-radius: 10px;
            border-top-left-radius: 10px;
            border-bottom-left-radius: 10px;
            background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0, rgb(242,242,242)), color-stop(1, rgb(242,242,242)) );
            cursor: pointer;
            overflow: hidden;
        }
        .searchSureButton:hover,.searchSureBtn:hover{
            color:#fff;
            background:#40E0D0;
        }
        .searchContainer{
            width:96%;
            max-height: 96%;
            min-height: 96%;
            margin-left: 2%;
            margin-top: 10px;
            min-width: 1300px;
        }
        .centerInput{
            margin-right: 10px;
        }
        .addCuloumn{
            width:30px;
            height:100%;
            font-size: 20px;
            line-height: 30px;
        }
        .seachHeader ul{
            width:85%;
            height:auto;
        }
        .seachHeader ul .title{
            width:100px;
            text-align: left;
        }
        .seachHeader ul li .deleteItem{
            line-height: 35px;
        }
        .formContent{
            height:auto;
            /*overflow-y: scroll;*/
        }
        .formContent center{
            margin-top: -10px;
        }
        .selectedBox{
            width:90px;
            height:auto;
            position: absolute;
            border:1px solid #ccc;
            cursor: pointer;
            overflow: hidden;
            z-index: 9999999;
            background: #fff;
            display:none;
            padding: 10px 0;
        }
        .selectedBox p{
            width:100%;
            height:30px;
            line-height: 30px;
            font-size: 14px;
            border-bottom: 1px solid #ccc;
            padding-left: 10px;

        }
        .selectedBox p:last-child{
            border-bottom:0;
        }
        .selectedBox p:hover{
            background:#5FB878;
        }
        .formContent center #pageBar2{
            position:absolute;
            bottom:10px;
            width:100%;
            text-align: center;
            display:none;
        }
        .searchSureBtn{
            display:none;
            margin-top:10px;
            margin-right:30px;
        }
    </style>
</head>
<body class="body">
<div id="loading">
    <img src='../styles/img/loading.gif' />
</div>
<div class="searchContainer">
    <div class="formContent">
    </div>
    <!-- <div class="searchSureBtn">确定</div>-->
</div>
</body>
<script type="text/javascript" src="../js/jquery-1.11.3.min.js"></script>
<script src="../js/common/publicClass.js"></script>
<script src="../js/common/myAjax.js"></script>
<script src="../js/common/utils.js"></script>
<script src="../layer/layer.js" charset="utf-8"></script>
<script language="Javascript" src="../jqueryNicepage/js/layui.js"></script>
<script>
    var height=document.body.clientHeight;
    var width =document.body.clientWidth;
    $("#loading img").css({
        "margin-left":width/2-25+"px",
        "margin-top":height/2-25+"px"
    })
    /*   window.event? window.event.cancelBubble = true : e.stopPropagation();*/
    // $(".searchSureButton").click(function(){
    var data=localStorage.getItem("arrFlage").split(",");
    console.log(data);
    MaterialReverseAjax1("/gx-test3",data,suCallback);
    function suCallback(str){
        $(".formContent").empty();
        $("#loading").css({
            display:"none"
        });
        if(str.datalist!=undefined&&str.datalist.length>0){
            var dataListObjArr=[];
            for(var i=0;i<str.datalist.length;i++){
                var dataListObj={};
                dataListObj.level =str.datalist[i].level!=undefined?str.datalist[i].level:"";
                dataListObj.number=str.datalist[i].number!=undefined?str.datalist[i].number:"";//成品名称
                dataListObjArr.push(dataListObj);
            }
            var heightform=$(".searchContainer").height()-$(".seachHeader").height()-20;
            $(".formContent").css({
                "max-height":heightform*0.85,
                "overflow-y":"scroll"
            });
            //   window.selectedAll=true;
            window.historyList1 =dataListObjArr;
            window.headers1= ["序号","分类属性名称","分类属性值"] //table的列名
            window.widths1 = ['100',"300","300"]//table每列的宽度
            $(".formContent").empty().load('./newTable.html',"",function(){
                setTimeout(function(){
                    var heightform=$(".searchContainer").height()-$(".seachHeader").height()-20;

                    if($(".formContent")[0].offsetHeight>(heightform*0.85)){
                        $("#pageBar2").css("top",heightform*0.85+$(".seachHeader").height()+30)
                    }else{
                        $("#pageBar2").css("top",$(".formContent")[0].offsetHeight+$(".seachHeader").height()+50);
                    }
                    $("#pageBar2").css("display","block");
                    $(".searchSureBtn").css("display","block");

                    clearTimeout();
                    var marginlelftLen=[];
                    for(var i=0;i< $(".formContent table tbody tr").length;i++){
                        marginlelftLen.push($(".formContent table tbody tr").eq(i).find(".td0").text()*1)
                    }
                    /*for(var m=0;m<marginlelftLen.length;m++){
                        $(".formContent table tbody tr").eq(m).find(".td1  a").css({
                            "padding-left":marginlelftLen[m]*6
                        })
                    }*/
                },200)
            });
        }
    }
    // })


</script>
</html>